﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TdgMaker
{
    class StationName
    {
        public static string[,] StationNames = { { "乌龙泉", "Wulongquan" }, 
                                       { "咸宁", "Xianning" },
                                       { "赤壁", "Chibi" },
                                       { "岳阳", "Yueyang" },
                                       { "汨罗", "Miluo" },
                                       { "长沙", "Changsha" },
                                       { "株洲北", "Zhuzhou North" },
                                       { "株洲南", "Zhuzhou South" },
                                       { "株洲西", "Zhuzhou west" },
                                       { "衡山", "Hengshan" },
                                       { "衡阳", "Hengyang" },
                                       { "耒阳", "Leiyang" },
                                       { "郴州", "Chenzhou" },
                                       { "乐昌", "Lechang" },
                                       { "韶关", "Shaoguan" },
                                       { "英德", "Yingde" },
                                       { "清远", "Qingyuan" },
                                       { "广州", "Guangzhou" },
                                       { "武汉", "Wuhan" }
                                       };



        public static string TranName(string s)
        {
            for (int i = 0; i < StationNames.Length / 2; i++)
            {
                if (s.IndexOf(StationNames[i, 0]) > 0)
                    return StationNames[i, 1];

                if (s.IndexOf(StationNames[i, 1]) > 0)
                    return StationNames[i, 1];
            }
            return s;
        }
    }
}
